<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Logger Panel</title>
<style>
.preWrap{
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
white-space: pre;
white-space: -hp-pre-wrap; /* HP Printers */
white-space: pre-line;
}
</style>
</head>
<body>
<script language="JavaScript" type="text/javascript">
<!--
	function init(){
		document.open("text/html", "replace");
		try{
			var doc = opener.document.doc;
			if(doc != undefined){
				document.title = opener.document.title;
				if(window.location.toString().indexOf("wordwrap") != -1){
					document.write("<pre class='preWrap'>" + doc + "</pre>");
				}else{
					document.write("<pre>" + doc + "</pre>");
				}
				return;
			}
		}catch(e){}
		var flashParams = {
			allowFullScreen:true,
			align:"middle",
			quality:"high",
			bgcolor:"#FFFFFF",
			allowScriptAccess:"always",
			type:"application/x-shockwave-flash",
			src:"LoggerPanel.swf?version=1.0"
		};
		var output = flashParamsToString("LoggerPanel", flashParams);
		document.write(output);
	}
	
	function flashParamsToString(id, flashParams){
		var str = 'width="100%" height="100%" ';
		if (document.all)
		{
			str = '<object id="' + id + '" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ' + str;
			for (var i in flashParams)
				str += '><param name="' + i + '" value="' + flashParams[i] + '" /';
			str += '></object>';
		} else {
			str = '<embed id="' + id + '" pluginspage="http://www.adobe.com/go/getflashplayer" ' + str;
			for (var i in flashParams)
				str += i + '="' + flashParams[i] + '" ';
			str += '> </embed>';
		}
		return str;
	}

	function traverse(node, tree){
		if(node.hasChildNodes() || node.data == undefined){
			tree.push('<ul><li>' + node.tagName);
			var attributes = [];
			for(var i = 0; i < node.attributes.length; i++)
				attributes.push(node.attributes[i].name + '="' + node.attributes[i].value + '"');
			if(attributes.length)
				tree.push(" <font color='#3366FF'>" + attributes.join(" ") + "</font>");
			var nodes = node.childNodes.length; 
			for(var i=0; i<node.childNodes.length; i++)
				traverse(node.childNodes[i], tree); 
			tree.push('</li></ul>'); 
		}else if(node.data && node.data.split(" ").join("").length){
			tree.push("<ul><li><font color='#006600'><b>" + node.data + "</b></font></li></ul>");
		}
	}
	
	var win;
	function writeDoc(value, time, doTraverse){
		value = value.replace(/^\"|\"$/g, "");
		var doc = value.replace(/\</g, "&lt;").replace(/\>/g, "&gt;");
		if(doTraverse == true){
			try{
				var xmlDoc;
				if(document.all){
					xmlDoc = new ActiveXObject("MSXML2.DOMDocument");
					xmlDoc.loadXML(value);
				}else{
					xmlDoc = new DOMParser().parseFromString(value, 'text/xml');
				}
				var tree = [];
				var node = xmlDoc.documentElement;
				if(node && node.tagName != "parsererror"){
					traverse(node, tree);
					doc = tree.join('');
				}
			}catch(e){
			}
		}
		try{
			if(win && !win.closed)
				win.close();
			win = window.open("about:blank" , "details" + new Date().getTime(), "");
			win.document.write("<html><title>Log " + time + "</title>");
			win.document.write("<body><a href='#' target='_blank' onclick='return true;'>Open in a new window</a>");
			win.document.write("&nbsp;|&nbsp;<a href='#?wordwrap' target='_blank' onclick='return true;'>Word Wrap</a>");
			win.document.write("<pre>" + doc + "</pre></body></html>");
			win.document.close();
			win.document.doc = doc;
			if (window.focus)
				win.focus();
		}catch(e){ win = null; }
	}
	init();
// -->
</script>
</body>
</html>